Skip to main content
QUICK REVIEW

[Paper Review] CoSimGNN: Towards Large-scale Graph Similarity Computation

Haoyan Xu, Runjian Chen|arXiv (Cornell University)|May 14, 2020
Advanced Graph Neural Networks32 references4 citations
TL;DR

CoSimGNN proposes a novel 'embedding-coarsening-matching' framework for large-scale graph similarity computation, leveraging adaptive graph pooling to coarsen graphs and fine-grained cross-graph attention for efficient, accurate similarity scoring. It achieves state-of-the-art performance with inference times up to 3× faster than prior methods on large graphs (up to 200 nodes).

ABSTRACT

The ability to compute similarity scores between graphs based on metrics such as Graph Edit Distance (GED) is important in many real-world applications. Computing exact GED values is typically an NP-hard problem and traditional algorithms usually achieve an unsatisfactory trade-off between accuracy and efficiency. Recently, Graph Neural Networks (GNNs) provide a data-driven solution for this task, which is more efficient while maintaining prediction accuracy in small graph (around 10 nodes per graph) similarity computation. Existing GNN-based methods, which either respectively embeds two graphs (lack of low-level cross-graph interactions) or deploy cross-graph interactions for whole graph pairs (redundant and time-consuming), are still not able to achieve competitive results when the number of nodes in graphs increases. In this paper, we focus on similarity computation for large-scale graphs and propose the "embedding-coarsening-matching" framework CoSimGNN, which first embeds and coarsens large graphs with adaptive pooling operation and then deploys fine-grained interactions on the coarsened graphs for final similarity scores. Furthermore, we create several synthetic datasets which provide new benchmarks for graph similarity computation. Detailed experiments on both synthetic and real-world datasets have been conducted and CoSimGNN achieves the best performance while the inference time is at most 1/3 of that of previous state-of-the-art.

Motivation & Objective

  • Address the critical challenge of balancing efficiency and accuracy in large-scale graph similarity computation, where traditional methods face NP-hard complexity or high computational cost.
  • Overcome limitations of existing GNN-based models: embedding models lack cross-graph interaction, while matching models suffer from quadratic time complexity due to pairwise node interactions.
  • Develop a scalable framework capable of capturing hierarchical and fine-grained structural differences in large graphs (e.g., 100–200 nodes) without sacrificing speed.
  • Create new, high-quality synthetic and real-world benchmarks with accurate ground-truth Graph Edit Distance (GED) labels for large-scale graph similarity tasks.
  • Enable practical deployment of graph similarity search in real-world domains such as bioinformatics and social network analysis by reducing inference time while maintaining high accuracy.

Proposed method

  • Propose a three-stage framework: (1) graph encoding via GNNs to learn node representations, (2) adaptive graph coarsening using learnable pooling layers to reduce graph size while preserving structural information, and (3) fine-grained cross-graph matching via inter-attention modules between coarsened graphs.
  • Introduce an adaptive pooling mechanism that dynamically learns cluster centroids per graph, avoiding the use of fixed, non-graph-specific centroids used in prior pooling methods.
  • Design a cross-graph inter-attention module (M) that enables low-level, node-wise attention between corresponding nodes in coarsened graphs, capturing subtle structural differences.
  • Integrate three components in the matching stage: node features (X), node importance (I), and cross-graph attention (M), with ablation studies confirming their individual and combined contributions.
  • Construct synthetic datasets (BA-60, BA-100, BA-200) with controlled structural variations and ground-truth GED via derivative graph generation, enabling accurate labeling for large graphs.
  • Use sub-exponential approximation algorithms with validation via minimum trimming steps to obtain more reliable GED labels, overcoming the infeasibility of exact GED computation on large graphs.

Experimental results

Research questions

  • RQ1Can a GNN-based framework achieve both high accuracy and efficiency in large-scale graph similarity computation, especially when graph size exceeds 100 nodes?
  • RQ2How does adaptive graph coarsening improve the representation of hierarchical and local structural features in large graphs compared to fixed pooling or end-to-end embedding?
  • RQ3To what extent do fine-grained cross-graph attention mechanisms enhance similarity prediction compared to global graph-level embeddings or coarser interactions?
  • RQ4Can synthetic datasets with accurate ground-truth GED labels be effectively constructed for large-scale graph similarity benchmarks, and how do they improve model evaluation?
  • RQ5What is the impact of architectural components (X, I, M) in the matching stage on final performance, and which component contributes most to accuracy gains?

Key findings

  • CoSimGNN achieves the best performance on both synthetic and real-world datasets, with a 99.75% accuracy on the BA-200 classification task, outperforming all baselines including GCN-Mean, GCN-Max, GSimCNN, and CoSim-Mem.
  • On the COIL-DEL dataset, CoSimGNN achieves 88.30% accuracy, significantly outperforming the second-best method (CoSim-Mem at 83.85%) and demonstrating strong generalization on real-world data.
  • In GED regression, CoSimGNN achieves an MSE of 0.95 and MAE of 22.06 on the BA-200 dataset, showing superior regression accuracy compared to other models.
  • Ablation studies confirm that all components (X, I, M) in the matching stage are essential, with the cross-graph inter-attention module (M) contributing the most to performance, as its removal causes the largest drop in accuracy.
  • Inference time for CoSimGNN is at most 1/3 of the previous state-of-the-art, making it highly efficient for large-scale similarity search in databases with hundreds of graphs.
  • The proposed synthetic datasets (BA-60, BA-100, BA-200) provide reliable, accurate GED labels—previously unavailable for large graphs—enabling robust benchmarking and future research in large-scale graph similarity.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.