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.
翻译:图相似性计算(GSC)旨在计算一对图之间的相似度,是图领域中的一个基础性问题,具有广泛的应用。在图相似性计算中,图编辑距离(GED)和最大公共子图(MCS)是两个重要的相似性度量指标,二者的精确计算均属于NP难问题。近期的解决方案不再追求计算精确值,而是利用图神经网络(GNNs)学习数据驱动的模型来估计GED和MCS。现有方法大多基于涉及跨图节点级交互的组件构建,这些组件产生了巨大的计算开销,但对提升效果却收效甚微。本文提出GraSP,一种用于GED和MCS预测的简单而有效的GSC方法。GraSP通过几个关键设计实现了高效的结果:通过位置编码增强节点特征,以及一个通过门控机制、残差连接和多尺度池化增强的GNN模型。理论上,GraSP能够超越1-WL测试,表明其具有高表达能力。实证方面,在多个广泛采用的基准数据集上,将GraSP与10个竞争方法进行比较的大量实验表明,GraSP在有效性和效率方面均优于现有技术。代码可在 https://github.com/HaoranZ99/GraSP 获取。