Table of Contents
Fetching ...

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.

GraSP: Simple yet Effective Graph Similarity Predictions

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.

Paper Structure

This paper contains 26 sections, 1 theorem, 12 equations, 14 figures, 9 tables.

Key Result

Proposition 1

Given a pair of non-isomorphic graphs $\mathcal{G}_1$ and $\mathcal{G}_2$ that cannot be discriminated by the 1-WL test, and the two graphs have different sets of initial position encodings, then GraSP can generate different graph representations for the two non-isomorphic graphs.

Figures (14)

  • Figure 1: GED and MCS examples from AIDS700nef dataset. Left: GED is 2 and right: MCS is 6.
  • Figure 2: The architecture of GraSP.
  • Figure 3: An example that MPGNNs fail to distinguish.
  • Figure 4: Inference time in second(s) per 10k pairs.
  • Figure 5: A ranking case study of GED prediction on AIDS700nef.
  • ...and 9 more figures

Theorems & Definitions (4)

  • Definition 1: Graph Edit Distance bunke_inexact_1983
  • Definition 2: Maximum Common Subgraph bunke_graph_1998
  • Proposition 1
  • proof