Fast neural method matches labeled graphs for molecular similarity

Equivariant Neural Primal-Dual Assignment for Maximum Common Edge Subgraphs

Machine Learning

Summary

Matching parts of two complex networks to find shared connections is helpful, especially in chemistry where molecules look like graphs. The authors developed a neural network approach that learns from many graph pairs to quickly find good matches without retraining each time. This method is much faster than previous ones and can even confirm when its solutions are optimal. It works well on different datasets, including molecules and social or protein networks, and respects special rules like preserving ring structures in molecules.

What this means in practice

  • For drug discovery teams: Speed up molecular similarity searches by matching molecular graphs rapidly with learned policies, enabling faster compound screening.
  • For bioinformatics analysts: Match protein interaction graphs efficiently to identify conserved substructures using a trained neural matching policy transferable across datasets.

Authors

Jiaqing Xie, Yanchao Li, Zhuo Yang, Yuxin Wang, Tianfan Fu, Yuqiang Li

Abstract

Maximum common edge subgraph (MCES) matching finds a partial vertex correspondence between two labeled graphs that preserves as many labeled edges as possible. Molecular similarity search requires matching many graph pairs, making the cost of repeated queries important. The strongest baseline attains accurate MCES solutions but trains a separate network for each pair. We introduce Equivariant Neural Primal-Dual Assignment (ENPDA), which learns a shared matching policy and applies it to new pairs without further training, answering queries roughly three orders of magnitude faster and recovering its training cost after a few dozen queries. The policy recomputes exact objective marginals for candidate matches and learns corrections and step sizes that update their scores. Target prices respond to competition when several source vertices favor the same target. Four update rounds and a Hungarian projection produce a partial one-to-one matching. We prove per-pair guarantees that hold for any network parameters. In exact arithmetic, reordering either graph permutes the assignment and price states, the projected matching is one-to-one, and repaired prices give a valid MCES upper bound. Subtracting the preserved-edge count bounds the optimality gap; combined with structural caps, these certificates prove global optimality for 60 of 291 native test pairs. On three molecular benchmarks with disjoint train/validation/test splits, ENPDA improves over an analytic counterpart with the same update and projection budget by 7.4-8.6 accuracy points; after one second of refinement search, 2.5-3 points of the gain remain. Transferred without fine-tuning to edge-deletion tasks from social and protein graphs, the policy gains 9.1-17.6 points over the analytic counterpart. When output matchings must keep aromatic rings intact, ENPDA recovers more reference bonds than the baselines on all three datasets.