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

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

Abstract

We propose a new and strengthened Branch-and-Bound (BnB) algorithm for the maximum common (connected) induced subgraph problem based on two new operators: Long-Short Memory (LSM) and Leaf vertex Union Match (LUM). The LSM operator maintains branching scores using a decaying mechanism to prioritize recent search rewards, while the LUM operator simultaneously matches leaf vertices to prune the search space without sacrificing optimality. Experiments demonstrate that our integrated algorithm, McSplit+LL, significantly outperforms the state-of-the-art reinforcement learning-based variant, McSplit+RL.

Introduction

The Maximum Common Subgraph (MCS) problem is a cornerstone of graph theory with critical applications in cheminformatics, computer vision, and pattern recognition. Given two graphs, the goal is to identify the largest subgraph common to both. As an NP-hard problem, MCS often leads to exponential search times. Modern solvers utilize Branch-and-Bound (BnB) frameworks like McSplit to explore search trees efficiently. However, these solvers often struggle with stale branching heuristics and fail to exploit simple structural symmetries.

Methodology

The proposed McSplit+LL algorithm introduces two key innovations to the standard BnB framework to address these limitations.

Long-Short Memory (LSM) Branching

While recent variants like McSplit+RL use reinforcement learning to guide branching decisions, they often suffer from "stale" data. As the search progresses, rewards accumulated early in the process may no longer be relevant. LSM addresses this by implementing a decaying mechanism. When a vertex's score reaches a predefined threshold, the algorithm halves all scores, ensuring that the solver prioritizes recent, relevant information (short-term memory) while maintaining overall trends (long-term memory).

Leaf vertex Union Match (LUM)

The LUM operator is a structural optimization that exploits local symmetries. The authors proved that if two vertices are matched, their respective "leaf" vertices (those with only one neighbor) can be matched immediately in clusters. This allows the algorithm to bypass multiple levels of the search tree by matching multiple vertex pairs simultaneously without affecting solution optimality.

The LUM operator matches leaf vertex clusters connected to currently matched vertices to prune the search space.

Experimental Evaluation and Results

The algorithm was tested on a massive benchmark of 25,552 instances, including biochemical reactions, image-based graphs, and 3D meshes. The primary comparison was made against McSplit+RL, the previous state-of-the-art.

McSplit+LL showed significant improvements across all metrics. On a subset of 2,309 moderate-difficulty instances, McSplit+LL solved 2,208 instances within the time limit, a nearly 10% improvement over McSplit+RL's 2,013 instances.

Performance comparison showing the number of solved instances over time for McSplit+LL versus the RL-based baseline on moderate difficulty instances.

Beyond solving more instances, the algorithm is notably faster. On "easy" instances, average runtime dropped from 0.83s to 0.51s. Ablation studies confirmed that both LSM and LUM contribute independently to these gains, with their combination providing the most robust performance. For the "Connected" variant of the problem (MCCS), the algorithm solved 8.83% more moderate instances than the baseline.

Conclusion

By combining a memory-aware branching heuristic with structural pruning, McSplit+LL sets a new benchmark for the MCS problem. The LSM operator effectively manages the non-stationary nature of the search space, while LUM provides a powerful method for exploiting local graph structures. Future work may extend these principles to more complex sub-structures, further pushing the boundaries of exact graph matching.

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