GraSP: Simple yet Effective Graph Similarity Predictions
Haoran Zheng, Jieming Shi, Renchi Yang
TL;DR
GraSP tackles the graph similarity prediction problem by predicting GED and MCS from graph embeddings learned independently per graph. It enhances node features with Random Walk Positional Encoding (RWPE), employs a gated residual GNN backbone (RGGC) with multi-scale pooling, and uses a Neural Tensor Network (NTN) to fuse distance and interaction signals for GED/MCS predictions, achieving expressiveness beyond the 1-WL test. The approach is empirically superior and notably efficient, thanks to avoiding cross-graph node-level interactions and enabling precomputation of RWPE; results across four real datasets show consistent gains over 10 baselines. The work provides solid theoretical and empirical support for simple yet powerful design choices in graph similarity modeling with practical impact for retrieval, ranking, and related applications.
Abstract
Graph similarity computation (GSC) is to calculate the similarity between one pair of graphs, which is a fundamental problem with fruitful applications in the graph community. In GSC, graph edit distance (GED) and maximum common subgraph (MCS) are two important similarity metrics, both of which are NP-hard to compute. Instead of calculating the exact values, recent solutions resort to leveraging graph neural networks (GNNs) to learn data-driven models for the estimation of GED and MCS. Most of them are built on components involving node-level interactions crossing graphs, which engender vast computation overhead but are of little avail in effectiveness. In the paper, we present GraSP, a simple yet effective GSC approach for GED and MCS prediction. GraSP achieves high result efficacy through several key instruments: enhanced node features via positional encoding and a GNN model augmented by a gating mechanism, residual connections, as well as multi-scale pooling. Theoretically, GraSP can surpass the 1-WL test, indicating its high expressiveness. Empirically, extensive experiments comparing GraSP against 10 competitors on multiple widely adopted benchmark datasets showcase the superiority of GraSP over prior arts in terms of both effectiveness and efficiency. The code is available at https://github.com/HaoranZ99/GraSP.
